package com.fesine.ssh.model;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * Created by Fesine on 2016/2/16.
 */
@MappedSuperclass
public abstract class BasePo implements Serializable {

    public static final int TRUE_NUM=1;
    public static final int FALSE_NUM=0;


    private String id;

    /**
     * strategy = "uuid2"和strategy = "uuid"的区别assigned
     */
    @Id
    @GenericGenerator(name = "systemUUID", strategy = "assigned")
    @GeneratedValue(generator = "systemUUID")
    @Column(name = "id", insertable = true, updatable = true, nullable = false)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
